from django.db import models


class Sort(models.Model):
    group = models.PositiveSmallIntegerField(verbose_name='分组')
    name = models.CharField(max_length=32, verbose_name='分类名称')
    ord = models.PositiveIntegerField(default=0, verbose_name='排序')
    is_active = models.BooleanField(default=False, verbose_name='是否启用 0禁用 1启用')
    is_delete = models.BooleanField(default=False, verbose_name='是否删除 1删除 0正常')
    pid = models.PositiveIntegerField(default=0, verbose_name='父级')

    class Meta:
        db_table = 'zeus_sort'
        verbose_name = '分类'
        verbose_name_plural = verbose_name

        def __str__(self):
            return self.name
